package BasicClass;


import javafx.beans.property.*;

public class Record {
    private final SimpleIntegerProperty Id;
    private final SimpleStringProperty AccountNumber;
    private final SimpleStringProperty AccountName;
    private final SimpleStringProperty ISBN;
    private final SimpleStringProperty BookName;
    private final SimpleIntegerProperty Number;
    private final SimpleStringProperty LoanTime;
    private final SimpleStringProperty ReturnTime;
    private final SimpleStringProperty FinishTime;
    private final SimpleStringProperty State;

    public Record(int Id, String AccountNumber, String AccountName, String ISBN, String BookName,
                  int Number, String LoanTime, String ReturnTime, String FinishTime, String State) {
        this.Id = new SimpleIntegerProperty(Id);
        this.AccountNumber =new SimpleStringProperty(AccountNumber);
        this.AccountName = new SimpleStringProperty(AccountName);
        this.ISBN = new SimpleStringProperty(ISBN);
        this.BookName = new SimpleStringProperty(BookName);
        this.Number = new SimpleIntegerProperty(Number);
        this.LoanTime = new SimpleStringProperty(LoanTime);
        this.ReturnTime = new SimpleStringProperty(ReturnTime);
        this.FinishTime = new SimpleStringProperty(FinishTime);
        this.State = new SimpleStringProperty(State);
    }

    public int getId() {return Id.get();}
    public void setId(int id) {this.Id.set(id);}
    public String getAccountNumber() {return AccountNumber.get();}
    public void setAccountNumber(String accountNumber) {this.AccountNumber.set(accountNumber);}
    public String getAccountName() {return AccountName.get();}
    public void setAccountName(String accountName) {this.AccountName.set(accountName);}
    public String getISBN() {return ISBN.get();}
    public void setISBN(String ISBN) {this.ISBN.set(ISBN);}
    public String getBookName() {return BookName.get();}
    public void setBookName(String bookName) {this.BookName.set(bookName);}
    public int getNumber() {return this.Number.get();}
    public void setNumber(int number) {this.Number.set(number);}
    public String getLoanTime() {return LoanTime.get();}
    public void setLoanTime(String loanTime) {this.LoanTime.set(loanTime);}
    public String getReturnTime() {return ReturnTime.get();}
    public void setReturnTime(String returnTime) {this.ReturnTime.set(returnTime);}
    public String getFinishTime() {return FinishTime.get();}
    public void setFinishTime(String finishTime) {this.FinishTime.set(finishTime);}
    public String getState() {return State.get();}
    public void setState(String state) {this.State.set(state);}

    public String toString(){
        return getId()+","+getAccountNumber()+","+getAccountName()+","+getISBN()+","+getBookName()+","+getNumber()+","
                +getLoanTime()+","+getReturnTime()+","+getFinishTime()+","+getState();
    }
}
